package com.whfc.ms.api.safety.service.impl;

import com.whfc.common.result.ListData;
import com.whfc.ms.api.safety.service.MsSafetyAreaService;
import com.whfc.safety.dto.SafetyAreaDTO;
import com.whfc.safety.param.SafetyAreaAddParam;
import com.whfc.safety.param.SafetyAreaEditParam;
import com.whfc.safety.service.SafetyAreaService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description 责任区域
 * @Author hw
 * @Date 2021-08-19 18:18
 * @Version 1.0
 */
@Service
public class MsSafetyAreaServiceImpl implements MsSafetyAreaService {


    @DubboReference(interfaceClass = SafetyAreaService.class, version = "1.0.0")
    private SafetyAreaService safetyAreaService;

    @Override
    public ListData<SafetyAreaDTO> list(Integer deptId, String name, String keyword) {
        List<SafetyAreaDTO> list = safetyAreaService.list(deptId, name, keyword);
        return new ListData<>(list);
    }

    @Override
    public void del(Integer areaId) {
        safetyAreaService.del(areaId);
    }

    @Override
    public void add(SafetyAreaAddParam param) {
        safetyAreaService.add(param);
    }

    @Override
    public void edit(SafetyAreaEditParam param) {
        safetyAreaService.edit(param);
    }
}
